package edu.hawaii.duedates.configuration;

import static org.junit.Assert.assertEquals;
import org.junit.Test;


/**
 * Tests the User class in the configuration package for Due Dates.
 * 
 * @author Tyler Wolff
 *
 */
public class TestUser {
  
  /**
   * Tests the creation of a basic User object.
   */
  @Test
  public void testUser () {
    User testUser = new User("Name", "email", "password");  
    assertEquals("Testing name", "Name", testUser.getName());
    assertEquals("Testing eamil", "email", testUser.getEmail());
    assertEquals("Testing password", "password", testUser.getPassword());
  }

  /**
   * Tests the set methods for uh and hsl parameters.
   */
  @Test
  public void testSetters() {
    User testUser = new User("Name1", "email1", "password1"); 
    testUser.setUhManoa("-uhm 12321111 tyler");
    testUser.setHawaiiStateLib("-hsl 2342 234234");
    
    assertEquals("Tests the getLibraryArgs method", "-uhm 12321111 tyler -hsl 2342 234234", 
        testUser.getLibraryArgs());
    assertEquals("Tests the getUh() method", "-uhm 12321111 tyler", testUser.getUh());
    assertEquals("Tests the getHsl() method", "-hsl 2342 234234", testUser.getHsl());
  }
  
}
